<template>
  <view class="container">
    <uni-forms :modelValue="form" label-width='200rpx'>

      <uni-forms-item>
        <uni-data-checkbox v-model="form.type1" :localdata="[{value:'sc',text:'伤残、生活无法自理'}]"
                           multiple></uni-data-checkbox>
      </uni-forms-item>

      <uni-forms-item label="申领金额" name="amount1">
        <uni-easyinput type="number" v-model="form.amount1" :disabled="disabled1" placeholder="请输入申领金额"></uni-easyinput>
      </uni-forms-item>
      <uni-forms-item label="申领次数" name="times1">
        <uni-easyinput type="number" v-model="form.times1" :disabled="disabled1" placeholder="请输入申领次数"></uni-easyinput>
      </uni-forms-item>
      <uni-forms-item>
        <uni-data-checkbox v-model="form.type2" :localdata="[{value:'60years',text:'年满60周岁'}]"
                           multiple></uni-data-checkbox>
      </uni-forms-item>

      <uni-forms-item label="申领金额" name="amount2">
        <uni-easyinput type="number" v-model="form.amount2" :disabled="disabled2" placeholder="请输入申领金额"></uni-easyinput>
      </uni-forms-item>
      <uni-forms-item label="申领次数" name="times2">
        <uni-easyinput type="number" v-model="form.times2" :disabled="disabled2" placeholder="请输入申领次数"></uni-easyinput>
      </uni-forms-item>

    </uni-forms>
    <view class="tip">
      <uni-icons type="help" size="20"></uni-icons>
      <text style="font-size: 12px">
        【{{ currentSyr.name }}】伤残（含工伤）、生活不能自理（包括因疾病或者意外等导致生活完全／大部分／部分不能自理等情 况【{{
          currentSyr.name
        }}】应提前向受托人提供经受托人认可的由劳动能力鉴定部门／医疗机构出具的鉴定证明等材料）或 【{{ currentSyr.name }}】年满60周岁，可领取定期生活费 。①【{{
          currentSyr.name
        }}】出具伤残、生活不能自理证明后， 受托人应于每自然年12月25日向【{{
          currentSyr.name
        }}】分配一次定期生活费，每次分配金额为【{{ !disabled1 && form.amount1 || '申领金额' }}】 万元，申领次数不超过 【{{
          !disabled1 && form.times1 || '申领次数'
        }}】次。②【{{ currentSyr.name }}】年满60周岁之后，受托人应于每自然年12 月25日向【{{
          currentSyr.name
        }}】分配一次定期生活费，每次分配金额为【{{ !disabled1 && form.amount2 || '申领金额' }}】万元，申领次数不 超过【{{
          !disabled1 && form.times2 || '申领次数'
        }}】次。如无需填写，则选择跳过。
      </text>
    </view>
    <view class="bottom" style="display: flex;justify-content: center">
      <button class="button" type="primary" @click="jump(215)">跳过</button>
      <button class="button" type="primary" @click="submit">下一步</button>
    </view>
  </view>
</template>

<script>
import userInfoMixin from "../../common/js/userInfoMixin";

export default {
  mixins: [userInfoMixin],
  data() {
    return {
      name: '214',
      form: {
        type1: [],
        times1: '',
        amount1: '',
        type2: [],
        times2: '',
        amount2: ''
      }
    }
  },
  computed: {
    disabled1() {
      return this.form.type1.length === 0
    },
    disabled2() {
      return this.form.type2.length === 0
    },
  },
  created() {
  },
  methods: {

    change() {

    },
    submit() {
      this.submitData({
        key: 'dqshf',
        data: this.form
      }, '215')

    },
  }
}
</script>

<style>

</style>
